package com.lantosec.hmrp.modules.login.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.lantosec.hmrp.core.kit.Result;
import com.lantosec.hmrp.modules.system.entity.SysDeptUser;
import com.lantosec.hmrp.modules.system.entity.SysUser;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface ILoginService extends IService<SysUser> {

    Result login(String userName, String passWord, HttpServletResponse response, HttpServletRequest request);

    Result avoidCloseLogin(SysUser user, HttpServletResponse response, HttpServletRequest request);

    List<SysDeptUser> getDeptAndPositionList(String userId);

    /**
     * 只针对于superuser
     * @param userName
     * @param passWord
     * @param response
     * @return
     */
    Result loginSuper(String userName, String passWord, HttpServletResponse response, HttpServletRequest request);

    /**
     * 岗位切换返回token数据
     * @param user
     * @param response
     * @param request
     * @return
     */
    Result choicePositionLogin(SysUser user, HttpServletResponse response, HttpServletRequest request);
}
